#!/bin/bash
diskpace() {
    clear
    df -k
}

whoseon(){
    clear
    who
}

memusage(){
    clear
    cat /proc/meminfo | less
}

menu(){
    clear
    echo 
    echo -e "\t\t\t Sys Admin Menu\n"
    echo -e "\t1.Display disk space"
    echo -e "\t2.Display logged on users"
    echo -e "\t3.Display memory usage"
    echo -e "\t0.Exit programe\n\n"
    echo -en "\t\tEnter option: "
    read -n 1 option
}


while [ 1 ]
do
menu
case $option in
    0)
        break;;
    1)
        diskpace;;
    2)
        whoseon;;
    3)
        memusage;;
    *)
        clear
        echo "Sorry ,wrong selection"
esac
    echo -en "\n\n\t\t Hit any key to continue"
    read -n 1 line
done

